fixing bugs, does not work yet, client server demo