email working, need to test and polish further