is_solved func, revamped solve