switched pageinit to pageload