improve rules (including tests)