added exit for repl