Scala monte carlo simulation