improving tests and rules