add comments and fixed spelling