add ActiveTasks method and Task struct