Adding in ad functionality- backend