added the rules and some parameter test code