prototype example code for client/server