add the summary flag, with tests