reads input from file