Could also be written a bit more idiomatically following a similar pattern as previous comment for `findClosest()`.