removed global buffer