dynamic buffer padding working