progress on redoing Flowlog.ml. don't compile yet