sample for working with client-server model