nit: variables like `li` and `label` are used above, please consider rename them or reuse them (without `var`).