modified repl-global