added very basic mime type guessing