closest_entity now takes in y coordinate in calculation