replaced the old networking code with AFNetworking