added a function to read input from a file