evil hack to avoid many global declarations.