first whack at CTE UPSERT