update pageview algorithm