added calculation for degenerate homology

does work...