added more tests
refactored parser