fix build and also add some comments