integrate server and client