v3 fixed formula

distance formula succssful