Added function to retrieve advertisement