basic interaction with the server, ugly and still working