extract content type initialize code to initContentType method