change mimewritable to take instance rather than type