Develop a musical composition incorporating the given motif and maintaining the required musical form.
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
['e2 dg', 'bagb aAAB cBcd egaf gbaf'  
X:1
L:1/8
Q:1/8=180
M:4/4
K:G
"^A dorian" (3Bcd | e2 dB eA (3ABA | eaaf gfed | e2 dg eBdB | GFGA BABd | e2 dg eA (3ABA | 
 eaaf gfed | e2 dg eBdB | GFGA BABd || eaa/b/a bagb | aAAB cBcd | egaf gbaf | gGGA BABd | 
 eaa/ba bagb | aAAB cBcd | egaf gbaf | gfgd BGBd |]"^last time" [Ace]8 |]  