update buffer size