sigh, still refactoring the top level stuff