Revert "NOT using scratch buffer"

This reverts commit 9779b3302c09e14acca541b7bb42dc97f0aa8e3c.