make pie chart work