fix example to use restriction class and document it