Added Casimir algorithm.