explanatory comments added