called calc_total_sales function for each data object; it's working fine