switched unless to if statement