changed update and delete of model

changed update and delete of model