Procedural Content Generation (PCG) and Dynamic Difficulty Adjustment (DDA) have been used separately in games to improve player experience. We explore using PCG and DDA together in a feedback loop to keep a player in the "flow zone." The central tenet of this work is a conjecture about how the shape of the performance versus difficulty curve changes at the boundaries of the flow zone. Based on this conjecture, we have developed an algorithm that detects when the player has left the flow zone and appropriately adjusts the difficulty to bring the gameplay back into flow, even as the skill of the player is changing. We developed a game-independent algorithm, implemented our algorithm for the open-source Infinite Mario Bros (IMB) game and conducted a user study that supports the hypothesis that players will enjoy the game more with DDA - PCG algorithm.