fixed bugs in summary output, and RR framework