Add the pie function to the common library