refactor user_match