modifica mail
refactoring and started the network part
added network part