clever section collapsing

also paging in the bottom has been added