updated the transitions and enhanced the parser