Added IndexOutOfBoundsException

Removed main. Can be found in the driver