add some comments to understand