added some comments to document