example code for TopNReport functionality