custom casting rules support