throw IndexOutOfBoundsException instead