Clarified logic with hyphen tests