change to use restriction by relmap