tweak custom rule functionality