use Base.writemime