tif working but inverted and needs testing