working on dynamic chart creation