Modified AdGenerator to accept data object