solver working, but very slow