logic to handle pending buffer added