Refactoring
work on rules