rewrote all page in js