rewriting the whole page