finish upd client and server code