changed size of buffer handling