rule handling implemented