docstring for read_from_file function