debug comparing array indices ranges