added sum_purchase