added rules and tests