added throw new IndexOutOfBoundsException()