added contract management and task generation