add pat 1017 code