added makeLocalBuf