[update:] code refactoring