make function of delete and update