first code of rule processing