change the way of set_page works