replaced unsecure/unsanitezed dom creation methods