added reachability to determine network status