modified code to correctly spit out data that is plottable for topo3, looots of TODOs