fix parser, add more tests