fix pie chart
remove unused variables