inheritance level compution