Added getClosest option