add some comments,it seems work well