refactor update in storage