add action and contion in rules