nextDouble actually changes the state of random, so put parenthesis here. i.e.
```scala
val x = random.nextDouble()
```