add rules and tests