add initial buffer option to avoid the worset case (data comes in increasing order of size)