divide server and client