created a static buffer array
fixed merges; implemented buffer