Merge that function? It's only used here.