generating data for charts