Feature/email query changes