added simple comments to aid reading