complete conversion to task-based