changed some logic in offer parsing