Used as a verb, the gerund has tenses and active and passive forms:
Forms of the gerund
|Perfect||having asked||having been asked|
A perfect gerund expresses an activity preceding the activity of the finite verb of the sentence:
I regret having told him that.
The only verb form which can follow the verbs avoid, enjoy and keep / keep on is the gerund.
The kids enjoyed playing outside in spite of the rain.
Do you enjoy going for log runs?
Not familiar with the Gerund? Then check this – The Gerund in english grammar.