added preliminary charting function