added XRC and better UD support