Use #each_with_object instead of #each