reformat result loop.