added a `replacePage()`  method, which allows to replace the content of a page at a certain position