add if statements to parser