added more comments to generate documentations