expose buffer to the work function