added comments to clarify