checks for connected network and now works on both wired and wireless