Final correct version of problem cost of data