toplevel changes for refactor