remove some debug prints, make new document more explicit
add some comments