Add and edit rules

add rules