moved repl 1.3+ code to repl_helpers