update term plan code