i'm not sure if we want to extend this function into the utils file.

it doesn't need to be global since no other file should need to determine the closest floor