refactored Tasks, now supports criterias