REFACTOR change to cover only html elements rather than every node