optimize the redundancy method