code cleanup
add task_type to tasks