modify by ljy