Hao Lu's code