finished rewriting the sympy appendix. However might need a brushup