modifying player distance logic