Mixed constructions 1
Example:

Getting to class early gave Amanda time to ask her instructor for extra help.

By getting to class early gave Amanda time to ask her instructor for extra help.

In the first sentence, the gerund Getting to class early is a proper subject for the verb gave.