added content type and metadata handling