added custom legend and caption to pies