label construction in JS