typo fix and added begin() / end() as alternativesfor apply() / reset()