top-level code getting nicer, but I think I can do one step better