implemented logRules(..) function