variable 'buffer_size' was unused originally