invertHour function added to remove hhd expired