Much faster (only walks through document once)