groundwork for client and server