better handling of content-types