working on charts functionality