Added suport for Add and Edit Rule