Fixed typo and added comments for clarification