jeffzjiang: zkcustomrule support and unit tests