creating the constructor imap