put pageinit outside