updated repl functions to allow defining the host