modified to print out sub-tasks of tasks