add scala mode support