move format out of the parser