implemented some networking functionality