seperation of client and server code