Added comments to make things clearer