Implementing auto solver