upsert with blocks