controlling and costing materials