replace if not condition with unless condition