add cost flow