network structure and algorithm done