add get_function to core