add reduce_sub to cast