introduced main controller setup