move mimeType to the constructor