solve determinant