small updates for build
merged
optional logging in applyRules