added DOM manipulation code