main controller updated