Refactoring task.status