move parser to lib directory