working things out

There are some problems with the output spatial data, and i switching
things around.