finishes the create method