fix typo and add comments