How a bioreactor works