switch pack to pop_output_buffer API