refactored rules as a dependency