Add delete rule function