added documentation and made a minor tweak in comment text