update code struct