Move & document top-n function