buffered input handler