add minor and determinant