refactoring
get_closest takes all kind of parameter