putting global lock