step 7: complex dom operation