write the function of creat