Change names and add comments to make reasoning clearer