add createServer and createClient helper functions