fixed class argument for main()-method
fixed indexOutOfBounds bug