make task_type be a dict instead of list