move parser to its own file