How is the underlined gerund used in the sentence?

Smiling is an important step in a baby's development.



A.
direct object


B.
object of a preposition


C.
predicate nominative


D.
subject
(smiling should be underlined.)