added rules and test