merge cao shun's code