change variable 'buffer' with 'outBuf'