Refactoring deadline_approaching method