avoid getting the buffer name several times