added new task generation code