Finished preliminary network finding code