update refactor