refactor for mime-db