Convert top10 to variable n top_cmds function