scala mode