parses if statements