update & refactor