fix bugs and introducing imap search with literals