Wrote getOptOuts function