fetched a new exercise
implemented each_with_object to reduce total # of lines of code