modify the create and update method