working on the create function