added debug statements to parser