implemented if statement in parser