added func_to_dict