simplified if statement