Implemented piping
updated for redirection