fixing binary iterator