add page handler in the beginning of init