added main controller and table controller