combine global and local