refactor user_details