added some comments to help me understand