Added unique solution checker