Finished the create function