using function pointer to make different branch for different rc