Added find defining class function from textbook.