ch18 implemented find_defining_class method