rewrote the bidding from async to sync