add res support.