Updated to reflect better function passing