converted global scope to modular scope