added comments and created if statements and variable

if satement on line 103  is used to stop the loop
the loop on 105 is used if the user chooses item one of the array