refactoring of the task classes