added if statements