finish get_function