added simple solver code
removed extra variable