Migrated to Scala