How can I get the value of 'dist' ?