add pie chart functionality