passing new references to next middleware