added email capability
fixed MAD