Added code to read input from raw input.