updated if statements