wrote comments to fill in gaps;