finished cacachematrix program