added spectral determinant code