replace innerHTML with appendChild method