add onLoad for mainpage