Function pointers added for switch-resume handling