second version of the mime filter