added function pointer handling