refactor the output format