A Theory of Creativity