(refactor) parser now working properly