improve page code