Added support for Add and Edit Rule