create main controller