working on outofrange exception