Added algorithm: getClosest