Added comments to explain program