moved REPL helpers