finish rewrite ClientHandler