refactored rules project