refactor user flows