Function Commit

Made the for loop jump inside of a function. Interact with the user
with prompts and alerts.