[update] improve code