Added the function that was lambdified for no good reason in the original (as far as I can tell...)