implement with sympy only