confused with scala

had val instead of var