fixed typo and add a few more comments