implemented simple repl thread