add code selection, in newer style