Change from unless to if condition