fixed hash replies
better logic to keep track of clients