[update] reorganize functions