added email queue
added tests