email functionality expanded, not complete yet