parser works but some stuff still needs some refactoring