adding some better debug to the parser function