Changed the way rules are being created