working through futher changes for #180 but not quite there yet.