Add determinant code