Use the function apply to execute the 'exec' function
Updated the demo to use the new exec signature.