Add some comments to better explain how this works