fixed typo, added some comments