established percentages hash outside the if else statement
removed percentages as an instance variable
fixed handling of keys to percentages array
added percentages back into the last else statement