custom rule support resturctured