ported provider to kotlin