started modifying the ad serving js to use callbacks