added redirect and email