added some networking code