rewrite to configure client and servers. fixes #2