changed if statements