Convert to kotlin