minor changes and now sends email#