refactor user tests