Added comment to clarify logic