init controller and DB setting