[update:] code rafactoring