Changed to upsert and the sorting