How is the gerund functioning in the sentence? The problem is thinking of a good topic.