refactoring code to use content negotiation terminology