by detecting the amount of infusate remaining