reading the whole file at once