created parser--it needs tests and refactoring