refactoring, remove duplicate between hidden single and hidden pair