main controller fixed