Started with total cost calculation