prepared communication with server, need to test some more, prepare and
fix sql sentences etc etc