improved partition puzzle.