added rule registery function