separated client and server in classes