First working solver