initialization for server and client

base version