simple client server finished (pending some much needed refactoring)