add label and while extraction