defined the read_file fn