changed priority_queue struct to near_far_pile