separated client/server code