Rules implementation done.

There is still need to use anDiP of course .