Implemented input redirection