going back to the write-to-disk approach