converted final distance output to int to make verifier happy