got rid of global lock