update code (creation dom in js is over)