cleaned up parser.cc