move decl to top level