Added comments to Catherine's code