implemented the create operation