add rules correctly