refactor a bit
allow imap to find plain part easier