refactored Task class specs and passing code