i think this should be in the f method, and closestEntity as well