updated tests to include optIn sub-document