Added comments to explain.