starting to add 'charting' code