client and network functions