Start to refactor update method