moved parser to lib