Implemented StdIn functionality