Changed the way the detail was calculated