added more more codes for total redundancy cost