Update mock function