Add network detetction