task resource refactoring