update code and resource