added explanatory comments