deleted buildChart function