added some more explanatory comments.