input redirection now works