rewrite dynamic generating DOM element