[server] finish final code