copy step in line 29 now uses stored variable