add type =0,1,2