piechart implementation second iteration