Change time conditions to if from unless - more readable