Implement first version of new Congruence algorithm