printing of section rewritten; add support for inverted sections