basic refactoring for tasks