improved emails and tests