introducing imap functionality