semi-working solver