PCNN alg. fixed