pred alg design