fixed broken rendering
added explanatory comments