server and client first implement