retrieving recent ads function to return Json array attempt 261