writemime function added, conversions removed