don't cast void pointer to function pointer