move global to local