Application of intrinsic and extrinsic motivation in the cycle of learning