introduce rule rwriting
implement conditional rule