move tm and sites to globals