adding state to parser