added code to produce good/poor figure