replace function pointer with a pointer to a magic static instance