hva: clean code duplication.