charting code added