only keep one level in memory at a time