Fns to find top-n functions

Still finding the right place for this