modified some condition in Network and NetworkGenerator class