Intrinsic motivation and extrinsic incentives in a repeated game with incomplete contracts