changed it so that it goes in and out of a scope after it parses 'begin'
and 'end'