changed code to use objects instead of arrays and completed JS4: Bonus 2