refactor user create / update method