Implemented new exception (OutOfRangeException, throws for incorrect
values)