changed if statement