size of the buffer must be at least two