small refactor of tasks