moved user_agent to its own file