correctly walk up the inheritance tree