implemented createOffer