The original function as found in my slides.