In composing this i first started composing a chord sequence as shown here:
-- blocking chords
blocking in chords
On the first pass of making the chords I was playing freely not thinking too much on the tempo.
Then from there i repeated the chord sequence a few times to get familiar with it.
By repeating the chord 3 times in digital audio workstation (i'm using Cubase) I could identify tempo issues and could fix them by ear.
-- improvising with right hand and left hand playing together
Then I began to add right hand to it. When I got comfortable enough I played both the chord and the right hand together, improvising.
-- section trimming
After this pass i identified a few areas in the freestyle playing that could be trimmed out. (for example an area that was going off tangent to how the song was beginning)
After hearing it a few times i thought the end ended a little too abruptly so i used a portion of the song earlier and ended with that.