basic structure for main controller