added read_from_file method