try to limit scope of globals