Ying's code