Valence theory