Updated code for PuzzleAll