add cost output method