refactor parser
Merge pull request #4 from obf73/parser_refactor

refactor parser