searching min valence