add package and implement closest/isClosest