Pasted in code for adapting language