Added Equation solving code from Koushik