initial steps at methods, added error logging to email