added server-client part