server done, client restructure