label selection refactor