refactor code :  loop over result sets, issue #44
populate all series using a loop, issue #44
fix spacing
improve captions
use constants