making all RangeRestriction instances go through constructor func