massive speedup of find_modes with less clever-clever list comprehension