some progress on making this work in haskell...