Modified so that it thorws IndexOutOfBoundsException instead of printing the error and returning null (see get, set, and remove methods for specific changes)