network state detection feature added