Update the function