changed logical operators