Step 6. Organize the code