get mime type & refractoring