chart is now updating dynamically, but data needs cleanup