the construction of the prior is now automatic
made changes to the demo and fixed a bug in the way we fix rows and deal with null rows