prepare for repl