finished alternative buffer implementation