added reachability and switched to afnetworking