manage the cost and record