build client first