Added the logic for isSolvable