programatically interact with server