charting functions updated