output by ranking