some changes. optimize main page loading