new implementation of isSolved()