add mainhandler and pagerIndicator