the main purpose of cost accounting is to