simplify distance calculation even more.