implemented galloping search for nextdoc