total cost update implemented