Code snippet typo and added comments