Added comments to show understanding