imap: determain howto make procedure, and going on