window refresh and adding name and id