added comments plus minor cosmetic change