add network clustering code