Converted to Kotlin & Gradle