moved content negociation to an event listener. tests