corrected some typos, added comment on the source code