Rewards and Intrinsic Motivation: Resolving the Controversy