refer to wiki for function pointer cast issues