moving from range error to exception