added classes to set up db and fetch emails