range check on index?