adding a debug mode to the parser