adding buffer size handling