Update metrics calculation to take heritage into account