modified by weiguo feng