Implement solving equation
Add test
Refactor