extract label to variable