edit zhang's code bug ...