add test for global case