added scala mode