implement redirection and pipe, and repl loop