update code with error