refactor puzzleClient