corrected typo, added comments