first draft of the client-recieve+main loop update