add code to read input from file