Added squared distance helper function