added comments and corrected typo