convert rules into meta rules