fixed typo, added comments