Intermediate valence theory of CePd3 and UNi5?x Cu x