hasOffer function is added