new array_get_closest function insertion