move parser to separate package