add scanNetwork function and edit main structure