adapting templates