Converted JetScope to Kotlin