Identifying the function of a gerund phrase