updated global code for each page