Updated determining the standard input