keeping everything in sync with sockets