Add comments to explain what the code does