add libdg_loop interface