have to reinsert javascript into the pages