delete and update code changed