code adaptation