make binIndex zero-indexed