adding back email logic