Code BY LI XINLIANG,implemented by Liang Sibiao