finished the create function without debug