update code and dict