adapting DOM