separate to client and server