Made changes in pie_template