code changes to test measure distance