change getContentType function