add function pointer generic example