changed Parser class, made to read whole document, breaks outside of debugger