There is still a problem with this method…

```
getAverageRating () {
let arraySum = function arr () {
return this._ratings.reduce (function (a,b) {
return a + b;});
}
let arrayAverage = **arraySum**/this._ratings.length;
return arrayAverage;
}
addRating (newRating) {
this._ratings.push(newRating);
}
```

In your code, `arraySum`

is a function, not a value. It doesn’t need to be a function, though, just a call to `reduce()`

to obtain the sum.

```
let arraySum = this.ratings.reduce (function (a,b) {
return a + b;
});
```

or if you want ES6,

```
let arraySum = this.ratings.reduce ((a,b) => a + b);
^
using getter
```

Now that we have it nicely simplified, we can write a single return line on the method.

```
getAverageRating () {
return this.ratings.reduce ((a,b) => a + b) / this.ratings.length;
}
```

Notice the getter in both operands.

This brings us to `addRating`

…

```
addRating (newRating) {
this.ratings = newRating;
}
```

Above we call the setter.