combined script with persistence, panel and chart under construction