add some comments & format