started implementing delete-rule function