I've got a really good idea for this pull request. 
Why don't you use a val instead of a var in this case?
I'm sure this would make your code MUCH better!