Adapted to Kotlin M10