refactor PUT